package svl.videoplayer.state 
{
	import flash.net.NetStream;	
	
	import svl.videoplayer.VideoStateManager;	
	import svl.videoplayer.state.IState;
	
	/**
	 * @author sanderl
	 */
	public class PlayState implements IState 
	{
		private var stateManager:VideoStateManager;
		
		public function PlayState(stateManager:VideoStateManager)
		{
			this.stateManager = stateManager;
		}
		
		public function startPlay(ns:NetStream, flv:String):void
		{
			trace("Already in play state");
		}
		
		public function stopPlay(ns:NetStream):void
		{
			trace("Set to stop state");
			ns.pause();
			ns.seek(0);
			stateManager.setState(stateManager.getStopState());
		}
		
		public function doPause(ns:NetStream):void
		{
			trace("do Pause");
			ns.pause();
			stateManager.setState(stateManager.getPauseState());
		}
	}
}
